<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.global.js"></script>
    <style>
        .demo {
            font-family: sans-serif;
            border: 1px solid #eee;
            border-radius: 2px;
            padding: 20px 30px;
            margin-top: 1em;
            margin-bottom: 40px;
            user-select: none;
            overflow-x: auto;
        }
    </style>
</head>

<body>
    <div id="example1" class="demo">
        <p>Using mustaches: {{ rawHtml }}</p>
        <p>Using v-html directive:
            <span v-html="rawHtml">
                <!-- rawHtml在这里 -->
            </span>
        </p>

        &lt;script&gt;
        console.log(document.cookie);
        &lt;/script&gt;
    </div>


    <script>
        const RenderHtmlApp = {
            data() {
                return {
                    rawHtml: '<span style="color: red">This should be red.</span>'
                }
            }
        }

        Vue.createApp(RenderHtmlApp).mount('#example1')
    </script>

</body>

</html>